package czy.demo.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import czy.demo.dubbo.base.pojo.Person;
import czy.demo.dubbo.base.service.PersonService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/person")
public class PersonController {

    @Reference
    private PersonService personService;

    @GetMapping
    public List<Person> getAll(){
        return this.personService.findAll();
    }


}
